//
//  LBSModel.m
//  carcareIOS
//
//  Created by ileo on 16/8/16.
//  Copyright © 2016年 chezheng. All rights reserved.
//

#import "LBSModel.h"

@implementation LBSModel
- (void)fillModelWithDic:(NSDictionary *)dic
{
    [super fillModelWithDic:dic];
    
    if (_isFit) {
        if (_isShow) {
            self.mallIconStr = @"mallBtnIconOn";
        }else
        {
            self.mallIconStr = @"mallBtnIconOffNew";
        }
    }
    
}
-(void)setStoreInfo:(NSArray *)storeInfo{
    _storeInfo = [storeInfo copy];
    
    NSMutableArray *tmp = [NSMutableArray arrayWithCapacity:storeInfo.count];
    [storeInfo enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        [tmp addObject:[[LBSStoreModel alloc] initWithDic:obj]];
    }];
    self.storeModels = [tmp copy];
}

@end


@implementation LBSStoreModel

-(void)setGps:(NSString *)gps{
    _gps = [gps copy];
    
    NSArray *arr = [gps componentsSeparatedByString:@","];
    if (arr.count == 2) {
        self.coordinate = CLLocationCoordinate2DMake([arr[1] doubleValue], [arr[0] doubleValue]);
    }
    
}

@end
